Passed
Pull Request — master (#57)
by Michael
03:00
created

CustomForm.js ➔ constructor   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
import NodeForm from './NodeForm';
2
3
class CustomForm extends NodeForm {
4
    /**
5
     * @param {string} formID id of the respective form element
6
     *
7
     * @return {void}
8
     */
9
    constructor(formID) {
10
        super();
11
12
        this.$form = jQuery(`#${formID}`);
13
        this.$form.find('[name="cancel-button"]').on('click', this.hide.bind(this));
14
    }
15
}
16
17
export default CustomForm;
18